﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <meta charset="utf-8" />
    <script type="text/javascript" src="/ViewV5/JS/jquery-1.11.2.min.js"></script>
    <script src="/ViewV5/JS/jquery-migrate-1.1.0.min.js"></script>
    <script src="ViewV5/EXIT.js"></script>

</head>
<body>
    <div class="main">
        <div class="inwrap">
            <h1>Exif.js 读取图像的元数据
            </h1>
            <h2>简单示例
            </h2>
            <div class="detail">
                <p>
                    Exif.js 提供了 JavaScript 读取图像的原始数据的功能扩展，例如：拍照方向、相机设备型号、拍摄时间、ISO 感光度、GPS 地理位置等数据。
                </p>
            </div>
            <div class="example">
                <div class="clearfix">
                    <div id="photos" class="photos">
                        <img src="ViewV5/QQ截图20170714095441.png" />
                        <img src="ViewV5/QQ截图20170714095503.png" />
                        <img src="ViewV5/微信图片_20180820170706.jpg" />
                    </div>
                    <div class="info">
                        <h3>查看 EXIF 信息
                        </h3>
                        <p>
                            点击左边的图片，获取该图片的 EXIF 信息。
                        </p>
                        <h4>EXIF.getAllTags()
                        </h4>
                        <div id="demo-log" class="log">
                        </div>
                        <h4>EXIF.pretty()
                        </h4>
                        <textarea id="demo-val" class="input full" rows="20" readonly>
							</textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script>
    (function () {
        var photoBox = $('#photos');
        var demoLog = $('#demo-log');
        var demoVal = $('#demo-val');
        photoBox.on('click', 'img', function () {
            $(this).addClass('n').siblings().removeClass('n');
            EXIF.getData(this, function () {
                var _dataTxt = EXIF.pretty(this);
                var _dataJson = JSON.stringify(EXIF.getAllTags(this));
                demoLog.html(_dataJson);
                demoVal.val(_dataTxt);
            }
                        );
        }
                   );
    }
    )();
</script>

</html>
